{% extends 'sys_templates/public/base.html' %}
{% block content %}
    <fieldset class="layui-elem-field layui-field-title site-title">
        <legend><a name="default">{{ title }}</a></legend>
    </fieldset>
    <form class="layui-form" enctype="multipart/form-data">
        {% for foo in form %}
            <div class="layui-form-item">
                <label class="layui-form-label">{{ foo.label }}</label>
                <div class="layui-input-block">
                    {{ foo }}
                </div>
            </div>
        {% endfor %}
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <a class="layui-btn" href="javascript:;" onclick="content_submit()">提交保存</a>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </form>
{% endblock %}
{% block footer_js %}
    <script charset="utf-8" src="{{ url_for('static',filename='lib/kindeditor/kindeditor-all.js') }}"></script>
    <script charset="utf-8" src="{{ url_for('static',filename='lib/kindeditor/lang/zh-CN.js') }}"></script>
    <link rel="stylesheet" href="{{ url_for('static',filename='lib/kindeditor/themes/default/edit_style.css') }}"/>
    <script>
            KindEditor.options.filterMode = false;
            KindEditor.ready(function (K) {
                window.editor = K.create('#content', {
                    uploadJson: '{{ url_for('cms_bp.upload') }}',
                    allowFileManager: false,
                    wellFormatMode: true,
                    resizeType: 1,
                    formatUploadUrl: false,
                    width:'960px'
                });
            });
        </script>
{% endblock %}